package com.blue.wechat.invoke.spi.custom;

import com.alibaba.fastjson.JSON;
import com.blue.wechat.cache.Wechat;
import com.blue.wechat.invoke.BaseInvoker;
import com.blue.wechat.invoke.WechatInvoker;
import com.blue.wechat.invoke.annotation.WechatUrl;
import com.blue.wechat.invoke.model.custom.AccountList;

/**
 * 获取客服帐号
 * 
 * @author zhengj
 * @since 1.0 2017年1月28日
 */
@WechatUrl(WechatInvoker.GET_CUSTOM_ACCOUNT)
public class GetCustomAccountInvoker extends BaseInvoker<AccountList>
{
	public GetCustomAccountInvoker()
	{
	}

	@Override
	protected WechatInvoker getInvoker()
	{
		return WechatInvoker.GET_CUSTOM_ACCOUNT;
	}

	@Override
	protected AccountList handleSuccess(String resp, Wechat wechat)
	{
		AccountList list = JSON.parseObject(resp, AccountList.class);
		return list;
	}
}
